<?php

namespace App\Service\UserCenter;

use App\Constants\ErrorCode;
use App\Model\HostApplyLog;
use App\Service\BaseService;

/**
 * 个人技能申请查询
 */
class HostApplyCheckService extends BaseService
{
    public function handle()
    {
        $userId = $this->getUserId();
        $check = HostApplyLog::checkRecord($userId);
        if ($check) {
            return $this->setError(ErrorCode::HOST_APPLY_ING, '你提交的申请正在审核中，请耐心等待~');
        }
        return ['check_result' => 1];
    }
}
